package isUnique;

public class Solution {
    public boolean isUnique(String astr) {
        int mask = 0;
        for (int i = 0; i < astr.length(); i++) {
            int x = astr.charAt(i)-'a';
            if((mask&(1<<x)) != 0) {
                return false;
            }
            mask|=(1<<x);
        }
        return true;
    }
}
